package coml.jiyun.hp.wanandroid.presenter;

import coml.jiyun.hp.wanandroid.base.BasePresenter;
import coml.jiyun.hp.wanandroid.bean.BannerBean;
import coml.jiyun.hp.wanandroid.model.BannerModel;
import coml.jiyun.hp.wanandroid.net.ResultCallBack;
import coml.jiyun.hp.wanandroid.view.BannerView;

public class BannerPresenter extends BasePresenter<BannerView> {

    private BannerModel bannerModel;


    @Override
    protected void initModel() {
        bannerModel = new BannerModel();
        addModel(bannerModel);
    }

    public void getBanner(){
        bannerModel.getBanner(new ResultCallBack<BannerBean>() {
            @Override
            public void onSuccess(BannerBean bannerBean) {
                mView.setBanner(bannerBean);
            }

            @Override
            public void onFail(String msg) {

            }
        });
    }
}
